<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Fonts</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GDK 2 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Visuals.html" title="Visuals">
<link rel="next" href="gdk-Cursors.html" title="Cursors">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-Visuals.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK 2 Reference Manual</th>
<td><a accesskey="n" href="gdk-Cursors.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gdk-Fonts.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gdk-Fonts.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gdk-Fonts"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk-Fonts.top_of_page"></a>Fonts</span></h2>
<p>Fonts — Loading and manipulating fonts</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gdk-Fonts.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gdk/gdk.h&gt;

                    <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont">GdkFont</a>;
enum                <a class="link" href="gdk-Fonts.html#GdkFontType" title="enum GdkFontType">GdkFontType</a>;
<a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           <a class="link" href="gdk-Fonts.html#gdk-font-load" title="gdk_font_load ()">gdk_font_load</a>                       (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *font_name</code></em>);
<a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           <a class="link" href="gdk-Fonts.html#gdk-font-load-for-display" title="gdk_font_load_for_display ()">gdk_font_load_for_display</a>           (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *font_name</code></em>);
<a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           <a class="link" href="gdk-Fonts.html#gdk-fontset-load" title="gdk_fontset_load ()">gdk_fontset_load</a>                    (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontset_name</code></em>);
<a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           <a class="link" href="gdk-Fonts.html#gdk-fontset-load-for-display" title="gdk_fontset_load_for_display ()">gdk_fontset_load_for_display</a>        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontset_name</code></em>);
<a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           <a class="link" href="gdk-Fonts.html#gdk-font-from-description" title="gdk_font_from_description ()">gdk_font_from_description</a>           (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> *font_desc</code></em>);
<a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           <a class="link" href="gdk-Fonts.html#gdk-font-from-description-for-display" title="gdk_font_from_description_for_display ()">gdk_font_from_description_for_display</a>
                                                        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> *font_desc</code></em>);
<a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *        <a class="link" href="gdk-Fonts.html#gdk-font-get-display" title="gdk_font_get_display ()">gdk_font_get_display</a>                (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);
<a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           <a class="link" href="gdk-Fonts.html#gdk-font-ref" title="gdk_font_ref ()">gdk_font_ref</a>                        (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Fonts.html#gdk-font-unref" title="gdk_font_unref ()">gdk_font_unref</a>                      (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-font-id" title="gdk_font_id ()">gdk_font_id</a>                         (<em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Fonts.html#gdk-font-equal" title="gdk_font_equal ()">gdk_font_equal</a>                      (<em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *fonta</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *fontb</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="gdk-Fonts.html#gdk-string-extents" title="gdk_string_extents ()">gdk_string_extents</a>                  (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *lbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *rbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *width</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *ascent</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *descent</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Fonts.html#gdk-text-extents" title="gdk_text_extents ()">gdk_text_extents</a>                    (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *lbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *rbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *width</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *ascent</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *descent</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Fonts.html#gdk-text-extents-wc" title="gdk_text_extents_wc ()">gdk_text_extents_wc</a>                 (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *lbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *rbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *width</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *ascent</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *descent</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-string-width" title="gdk_string_width ()">gdk_string_width</a>                    (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-text-width" title="gdk_text_width ()">gdk_text_width</a>                      (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-text-width-wc" title="gdk_text_width_wc ()">gdk_text_width_wc</a>                   (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-char-width" title="gdk_char_width ()">gdk_char_width</a>                      (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> character</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-char-width-wc" title="gdk_char_width_wc ()">gdk_char_width_wc</a>                   (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> character</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-string-measure" title="gdk_string_measure ()">gdk_string_measure</a>                  (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-text-measure" title="gdk_text_measure ()">gdk_text_measure</a>                    (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-char-measure" title="gdk_char_measure ()">gdk_char_measure</a>                    (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> character</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-string-height" title="gdk_string_height ()">gdk_string_height</a>                   (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-text-height" title="gdk_text_height ()">gdk_text_height</a>                     (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-char-height" title="gdk_char_height ()">gdk_char_height</a>                     (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> character</code></em>);

typedef             <a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar">GdkWChar</a>;
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="gdk-Fonts.html#gdk-wcstombs" title="gdk_wcstombs ()">gdk_wcstombs</a>                        (<em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> *src</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk-Fonts.html#gdk-mbstowcs" title="gdk_mbstowcs ()">gdk_mbstowcs</a>                        (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> *dest</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *src</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> dest_max</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gdk-Fonts.description"></a><h2>Description</h2>
<p>
The <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> data type represents a font for drawing on
the screen. These functions provide support for
loading fonts, and also for determining the dimensions
of characters and strings when drawn with a particular
font.
</p>
<p>
Fonts in X are specified by a
<em class="firstterm">X Logical Font Description</em>.
The following description is considerably simplified.
For definitive information about XLFD's see the
X reference documentation. A X Logical Font Description (XLFD)
consists of a sequence of fields separated (and surrounded by) '-'
characters. For example, Adobe Helvetica Bold 12 pt, has the
full description:
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="string">"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
<p>
The fields in the XLFD are:
</p>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td>Foundry</td>
<td>the company or organization where the font originated.</td>
</tr>
<tr>
<td>Family</td>
<td>the font family (a group of related font designs).</td>
</tr>
<tr>
<td>Weight</td>
<td>A name for the font's typographic weight
For example, 'bold' or 'medium').</td>
</tr>
<tr>
<td>Slant</td>
<td>The slant of the font. Common values are 'R' for Roman,
'I' for italoc, and 'O' for oblique.</td>
</tr>
<tr>
<td>Set Width</td>
<td>A name for the width of the font. For example,
'normal' or 'condensed'.</td>
</tr>
<tr>
<td>Add Style</td>
<td>Additional information to distinguish a font from
other fonts of the same family.</td>
</tr>
<tr>
<td>Pixel Size</td>
<td>The body size of the font in pixels.</td>
</tr>
<tr>
<td>Point Size</td>
<td>The body size of the font in 10ths of a point.
(A <em class="firstterm">point</em> is 1/72.27 inch) </td>
</tr>
<tr>
<td>Resolution X</td>
<td>The horizontal resolution that the font was designed for.</td>
</tr>
<tr>
<td>Resolution Y</td>
<td>The vertical resolution that the font was designed for .</td>
</tr>
<tr>
<td>Spacing</td>
<td>The type of spacing for the font - can be 'p' for proportional,
'm' for monospaced or 'c' for charcell.</td>
</tr>
<tr>
<td>Average Width</td>
<td>The average width of a glyph in the font. For monospaced
and charcell fonts, all glyphs in the font have this width</td>
</tr>
<tr>
<td>Charset Registry</td>
<td>The registration authority that owns the encoding for
the font. Together with the Charset Encoding field, this
defines the character set for the font.</td>
</tr>
<tr>
<td>Charset Encoding</td>
<td>An identifier for the particular character set encoding.</td>
</tr>
</tbody>
</table></div>
<p>
</p>
<p>
When specifying a font via a X logical Font Description,
'*' can be used as a wildcard to match any portion of
the XLFD. For instance, the above example could
also be specified as
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="string">"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
It is generally a good idea to use wildcards for any
portion of the XLFD that your program does not care
about specifically, since that will improve the
chances of finding a matching font.
</p>
<p>
A <em class="firstterm">fontset</em> is a list of fonts
that is used for drawing international text that may
contain characters from a number of different character
sets. It is represented by a list of XLFD's.
</p>
<p>
The font for a given character set is determined by going
through the list of XLFD's in order. For each one, if
the registry and and encoding fields match the desired
character set, then that font is used, otherwise if
the XLFD contains wild-cards for the registry and encoding
fields, the registry and encoding for the desired character
set are substituted in and a lookup is done. If a match is found
that font is used. Otherwise, processing continues
on to the next font in the list.
</p>
<p>
The functions for determining the metrics of a string
come in several varieties that can take a number
of forms of string input:
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">8-bit string</span></p></td>
<td><p>
    When using functions like <a class="link" href="gdk-Fonts.html#gdk-string-width" title="gdk_string_width ()"><code class="function">gdk_string_width()</code></a> that
    take a <span class="type">gchar *</span>, if the font is of type
    <a class="link" href="gdk-Fonts.html#GDK-FONT-FONT:CAPS"><code class="literal">GDK_FONT_FONT</code></a> and is an 8-bit font, then each
    <span class="type">gchar</span> indexes the glyphs in the font directly.
    </p></td>
</tr>
<tr>
<td><p><span class="term">16-bit string</span></p></td>
<td><p>
    For functions taking a <span class="type">gchar *</span>, if the
    font is of type <a class="link" href="gdk-Fonts.html#GDK-FONT-FONT:CAPS"><code class="literal">GDK_FONT_FONT</code></a>, and is a 16-bit
    font, then the <span class="type">gchar *</span> argument is
    interpreted as a <span class="type">guint16 *</span> cast to
    a <span class="type">gchar *</span> and each <span class="type">guint16</span>
    indexes the glyphs in the font directly.
    </p></td>
</tr>
<tr>
<td><p><span class="term">Multibyte string</span></p></td>
<td><p>
    For functions taking a <span class="type">gchar *</span>, if the
    font is of type <a class="link" href="gdk-Fonts.html#GDK-FONT-FONTSET:CAPS"><code class="literal">GDK_FONT_FONTSET</code></a>, then the input
    string is interpreted as a <em class="firstterm">multibyte</em>
    encoded according to the current locale. (A multibyte
    string is one in which each character may consist
    of one or more bytes, with different lengths for different
    characters in the string). They can be converted to and
    from wide character strings (see below) using
    <a class="link" href="gdk-Fonts.html#gdk-wcstombs" title="gdk_wcstombs ()"><code class="function">gdk_wcstombs()</code></a> and <a class="link" href="gdk-Fonts.html#gdk-mbstowcs" title="gdk_mbstowcs ()"><code class="function">gdk_mbstowcs()</code></a>.) The string will
    be rendered using one or more different fonts from
    the fontset.
    </p></td>
</tr>
<tr>
<td><p><span class="term">Wide character string</span></p></td>
<td><p>
    For a number of the text-measuring functions, GDK
    provides a variant (such as <a class="link" href="gdk-Fonts.html#gdk-text-width-wc" title="gdk_text_width_wc ()"><code class="function">gdk_text_width_wc()</code></a>) which
    takes a <span class="type">GdkWChar *</span> instead of a
    <span class="type">gchar *</span>. The input is then taken to
    be a wide character string in the encoding of the
    current locale. (A wide character string is a string
    in which each character consists of several bytes,
    and the width of each character in the string is
    constant.)
    </p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
<p>
GDK provides functions to determine a number of different
measurements (metrics) for a given string. (Need diagram
here).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">ascent</span></p></td>
<td><p>
    The vertical distance from the origin of the drawing
    opereration to the top of the drawn character.
    </p></td>
</tr>
<tr>
<td><p><span class="term">descent</span></p></td>
<td><p>
    The vertical distance from the origin of the drawing
    opereration to the bottom of the drawn character.
    </p></td>
</tr>
<tr>
<td><p><span class="term">left bearing</span></p></td>
<td><p>
    The horizontal distance from the origin of the drawing
    operation to the left-most part of the drawn character.
    </p></td>
</tr>
<tr>
<td><p><span class="term">right bearing</span></p></td>
<td><p>
    The horizontal distance from the origin of the drawing
    operation to the right-most part of the drawn character.
    </p></td>
</tr>
<tr>
<td><p><span class="term">width bearing</span></p></td>
<td><p>
    The horizontal distance from the origin of the drawing
    operation to the correct origin for drawing another
    string to follow the current one. Depending on the
    font, this could be greater than or less than the
    right bearing.
    </p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
</div>
<div class="refsect1">
<a name="gdk-Fonts.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GdkFont"></a><h3>GdkFont</h3>
<pre class="programlisting">typedef struct {
  GdkFontType type;
  gint ascent;
  gint descent;
} GdkFont;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GdkFont</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
The <span class="structname">GdkFont</span> structure represents a font or fontset. It
contains the following public fields. A new <span class="structname">GdkFont</span>
structure is returned by <a class="link" href="gdk-Fonts.html#gdk-font-load" title="gdk_font_load ()"><code class="function">gdk_font_load()</code></a> or <a class="link" href="gdk-Fonts.html#gdk-fontset-load" title="gdk_fontset_load ()"><code class="function">gdk_fontset_load()</code></a>,
and is reference counted with <a class="link" href="gdk-Fonts.html#gdk-font-ref" title="gdk_font_ref ()"><code class="function">gdk_font_ref()</code></a> and <a class="link" href="gdk-Fonts.html#gdk-font-unref" title="gdk_font_unref ()"><code class="function">gdk_font_unref()</code></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Fonts.html#GdkFontType" title="enum GdkFontType"><span class="type">GdkFontType</span></a> <em class="structfield"><code><a name="GdkFont.type"></a>type</code></em>;</span></p></td>
<td>a value of type <a class="link" href="gdk-Fonts.html#GdkFontType" title="enum GdkFontType"><span class="type">GdkFontType</span></a> which indicates
whether this font is a single font or a fontset.</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GdkFont.ascent"></a>ascent</code></em>;</span></p></td>
<td>the maximum distance that the font, when drawn,
ascends above the baseline.</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GdkFont.descent"></a>descent</code></em>;</span></p></td>
<td>the maximum distance that the font, when drawn,
descends below the baseline.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkFontType"></a><h3>enum GdkFontType</h3>
<pre class="programlisting">typedef enum {
  GDK_FONT_FONT,
  GDK_FONT_FONTSET
} GdkFontType;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GdkFontType</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Indicates the type of a font. The possible values
are currently:
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-FONT-FONT:CAPS"></a><span class="term"><code class="literal">GDK_FONT_FONT</code></span></p></td>
<td>the font is a single font.
</td>
</tr>
<tr>
<td><p><a name="GDK-FONT-FONTSET:CAPS"></a><span class="term"><code class="literal">GDK_FONT_FONTSET</code></span></p></td>
<td>the font is a fontset.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-font-load"></a><h3>gdk_font_load ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           gdk_font_load                       (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *font_name</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_load</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a font.
</p>
<p>
The font may be newly loaded or looked up the font in a cache. 
You should make no assumptions about the initial reference count.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font_name</code></em> :</span></p></td>
<td>a XLFD describing the font to load.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the font could not be loaded.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-font-load-for-display"></a><h3>gdk_font_load_for_display ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           gdk_font_load_for_display           (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *font_name</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_load_for_display</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a font for use on <em class="parameter"><code>display</code></em>.
</p>
<p>
The font may be newly loaded or looked up the font in a cache. 
You should make no assumptions about the initial reference count.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td>a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>font_name</code></em> :</span></p></td>
<td>a XLFD describing the font to load.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the font could not be loaded.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-fontset-load"></a><h3>gdk_fontset_load ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           gdk_fontset_load                    (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontset_name</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_fontset_load</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a fontset.
</p>
<p>
The fontset may be newly loaded or looked up in a cache. 
You should make no assumptions about the initial reference count.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>fontset_name</code></em> :</span></p></td>
<td>a comma-separated list of XLFDs describing
the component fonts of the fontset to load.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the fontset could not be loaded.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-fontset-load-for-display"></a><h3>gdk_fontset_load_for_display ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           gdk_fontset_load_for_display        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontset_name</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_fontset_load_for_display</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a fontset for use on <em class="parameter"><code>display</code></em>.
</p>
<p>
The fontset may be newly loaded or looked up in a cache. 
You should make no assumptions about the initial reference count.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td>a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fontset_name</code></em> :</span></p></td>
<td>a comma-separated list of XLFDs describing
the component fonts of the fontset to load.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the fontset could not be loaded.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-font-from-description"></a><h3>gdk_font_from_description ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           gdk_font_from_description           (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> *font_desc</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_from_description</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Load a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> based on a Pango font description. This font will
only be an approximation of the Pango font, and
internationalization will not be handled correctly. This function
should only be used for legacy code that cannot be easily converted
to use Pango. Using Pango directly will produce better results.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font_desc</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly loaded font, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the font
cannot be loaded.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-font-from-description-for-display"></a><h3>gdk_font_from_description_for_display ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           gdk_font_from_description_for_display
                                                        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> *font_desc</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_from_description_for_display</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> based on a Pango font description for use on <em class="parameter"><code>display</code></em>. 
This font will only be an approximation of the Pango font, and
internationalization will not be handled correctly. This function
should only be used for legacy code that cannot be easily converted
to use Pango. Using Pango directly will produce better results.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td>a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>font_desc</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly loaded font, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the font
cannot be loaded.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-font-get-display"></a><h3>gdk_font_get_display ()</h3>
<pre class="programlisting"><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *        gdk_font_get_display                (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_get_display</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Returns the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> for <em class="parameter"><code>font</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the corresponding <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-font-ref"></a><h3>gdk_font_ref ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="returnvalue">GdkFont</span></a> *           gdk_font_ref                        (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_ref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Increases the reference count of a font by one.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td><em class="parameter"><code>font</code></em></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-font-unref"></a><h3>gdk_font_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_font_unref                      (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_unref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Decreases the reference count of a font by one.
If the result is zero, destroys the font.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-font-id"></a><h3>gdk_font_id ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_font_id                         (<em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_id</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Returns the X Font ID for the given font.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the numeric X Font ID</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-font-equal"></a><h3>gdk_font_equal ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_font_equal                      (<em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *fonta</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *fontb</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_equal</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Compares two fonts for equality. Single fonts compare equal
if they have the same X font ID. This operation does
not currently work correctly for fontsets.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>fonta</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fontb</code></em> :</span></p></td>
<td>another <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the fonts are equal.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-string-extents"></a><h3>gdk_string_extents ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_string_extents                  (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *lbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *rbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *width</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *ascent</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *descent</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_string_extents</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the metrics of a nul-terminated string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>the nul-terminated string to measure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>lbearing</code></em> :</span></p></td>
<td>the left bearing of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rbearing</code></em> :</span></p></td>
<td>the right bearing of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>the width of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ascent</code></em> :</span></p></td>
<td>the ascent of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>descent</code></em> :</span></p></td>
<td>the descent of the string.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-text-extents"></a><h3>gdk_text_extents ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_text_extents                    (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *lbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *rbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *width</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *ascent</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *descent</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_extents</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the metrics of a string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
<td>the text to measure</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text_length</code></em> :</span></p></td>
<td>the length of the text in bytes. (If the
font is a 16-bit font, this is twice the length
of the text in characters.)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>lbearing</code></em> :</span></p></td>
<td>the left bearing of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rbearing</code></em> :</span></p></td>
<td>the right bearing of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>the width of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ascent</code></em> :</span></p></td>
<td>the ascent of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>descent</code></em> :</span></p></td>
<td>the descent of the string.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-text-extents-wc"></a><h3>gdk_text_extents_wc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_text_extents_wc                 (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *lbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *rbearing</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *width</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *ascent</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *descent</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_extents_wc</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the metrics of a string of wide characters.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
<td>the text to measure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text_length</code></em> :</span></p></td>
<td>the length of the text in character.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>lbearing</code></em> :</span></p></td>
<td>the left bearing of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rbearing</code></em> :</span></p></td>
<td>the right bearing of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>the width of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ascent</code></em> :</span></p></td>
<td>the ascent of the string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>descent</code></em> :</span></p></td>
<td>the descent of the string.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-string-width"></a><h3>gdk_string_width ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_string_width                    (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_string_width</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the width of a nul-terminated string.
(The distance from the origin of the string to the 
point where the next string in a sequence of strings
should be drawn)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>the nul-terminated string to measure</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the width of the string in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-text-width"></a><h3>gdk_text_width ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_text_width                      (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_width</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the width of a given string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
<td>the text to measure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text_length</code></em> :</span></p></td>
<td>the length of the text in bytes.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the width of the string in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-text-width-wc"></a><h3>gdk_text_width_wc ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_text_width_wc                   (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_width_wc</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the width of a given wide-character string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
<td>the text to measure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text_length</code></em> :</span></p></td>
<td>the length of the text in characters.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the width of the string in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-char-width"></a><h3>gdk_char_width ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_char_width                      (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> character</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_char_width</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <a class="link" href="gdk-Fonts.html#gdk-text-extents" title="gdk_text_extents ()"><code class="function">gdk_text_extents()</code></a> instead.</p>
</div>
<p>
Determines the width of a given character.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>character</code></em> :</span></p></td>
<td>the character to measure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the width of the character in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-char-width-wc"></a><h3>gdk_char_width_wc ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_char_width_wc                   (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> character</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_char_width_wc</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the width of a given wide character. (Encoded
in the wide-character encoding of the current locale).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>character</code></em> :</span></p></td>
<td>the character to measure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the width of the character in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-string-measure"></a><h3>gdk_string_measure ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_string_measure                  (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_string_measure</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the distance from the origin to the rightmost
portion of a nul-terminated string when drawn. This is not the
correct value for determining the origin of the next
portion when drawing text in multiple pieces.
See <a class="link" href="gdk-Fonts.html#gdk-string-width" title="gdk_string_width ()"><code class="function">gdk_string_width()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>the nul-terminated string to measure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the right bearing of the string in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-text-measure"></a><h3>gdk_text_measure ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_text_measure                    (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_measure</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the distance from the origin to the rightmost
portion of a string when drawn. This is not the
correct value for determining the origin of the next
portion when drawing text in multiple pieces. 
See <a class="link" href="gdk-Fonts.html#gdk-text-width" title="gdk_text_width ()"><code class="function">gdk_text_width()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
<td>the text to measure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text_length</code></em> :</span></p></td>
<td>the length of the text in bytes.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the right bearing of the string in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-char-measure"></a><h3>gdk_char_measure ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_char_measure                    (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> character</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_char_measure</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the distance from the origin to the rightmost
portion of a character when drawn. This is not the
correct value for determining the origin of the next
portion when drawing text in multiple pieces.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>character</code></em> :</span></p></td>
<td>the character to measure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the right bearing of the character in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-string-height"></a><h3>gdk_string_height ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_string_height                   (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_string_height</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the total height of a given nul-terminated
string. This value is not generally useful, because you
cannot determine how this total height will be drawn in
relation to the baseline. See <a class="link" href="gdk-Fonts.html#gdk-string-extents" title="gdk_string_extents ()"><code class="function">gdk_string_extents()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>the nul-terminated string to measure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the height of the string in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-text-height"></a><h3>gdk_text_height ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_text_height                     (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> text_length</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_height</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the total height of a given string.
This value is not generally useful, because you cannot
determine how this total height will be drawn in
relation to the baseline. See <a class="link" href="gdk-Fonts.html#gdk-text-extents" title="gdk_text_extents ()"><code class="function">gdk_text_extents()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
<td>the text to measure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text_length</code></em> :</span></p></td>
<td>the length of the text in bytes.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the height of the string in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-char-height"></a><h3>gdk_char_height ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_char_height                     (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> character</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_char_height</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <a class="link" href="gdk-Fonts.html#gdk-text-extents" title="gdk_text_extents ()"><code class="function">gdk_text_extents()</code></a> instead.</p>
</div>
<p>
Determines the total height of a given character.
This value is not generally useful, because you cannot
determine how this total height will be drawn in
relation to the baseline. See <a class="link" href="gdk-Fonts.html#gdk-text-extents" title="gdk_text_extents ()"><code class="function">gdk_text_extents()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>character</code></em> :</span></p></td>
<td>the character to measure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the height of the character in pixels.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkWChar"></a><h3>GdkWChar</h3>
<pre class="programlisting">typedef guint32			    GdkWChar;
</pre>
<p>
Specifies a wide character type, used to represent character codes.
This is needed since some native languages have character sets which have
more than 256 characters (Japanese and Chinese, for example).
</p>
<p>
Wide character values between 0 and 127 are always identical in meaning to
the ASCII character codes. The wide character value 0 is often used to
terminate strings of wide characters in a similar way to normal strings
using the char type.
</p>
<p>
An alternative to wide characters is multi-byte characters, which extend
normal char strings to cope with larger character sets. As the name suggests,
multi-byte characters use a different number of bytes to store different
character codes. For example codes 0-127 (i.e. the ASCII codes) often
use just one byte of memory, while other codes may use 2, 3 or even 4 bytes.
Multi-byte characters have the advantage that they can often be used in an
application with little change, since strings are still represented as arrays
of char values. However multi-byte strings are much easier to manipulate since
the character are all of the same size.
</p>
<p>
Applications typically use wide characters to represent character codes
internally, and multi-byte strings when saving the characters to a file.
The <a class="link" href="gdk-Fonts.html#gdk-wcstombs" title="gdk_wcstombs ()"><code class="function">gdk_wcstombs()</code></a> and <a class="link" href="gdk-Fonts.html#gdk-mbstowcs" title="gdk_mbstowcs ()"><code class="function">gdk_mbstowcs()</code></a> functions can be used to convert from
one representation to the other.
</p>
<p>
See the 'Extended Characters' section of the GNU C Library Reference Manual
for more detailed information on wide and multi-byte characters.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-wcstombs"></a><h3>gdk_wcstombs ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             gdk_wcstombs                        (<em class="parameter"><code>const <a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> *src</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_wcstombs</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Converts a wide character string to a multi-byte string.
(The function name comes from an acronym of 'Wide Character String TO
Multi-Byte String').
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
<td>a wide character string.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the multi-byte string corresponding to <em class="parameter"><code>src</code></em>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the
conversion failed. The returned string should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no
longer needed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-mbstowcs"></a><h3>gdk_mbstowcs ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_mbstowcs                        (<em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkWChar" title="GdkWChar"><span class="type">GdkWChar</span></a> *dest</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *src</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> dest_max</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_mbstowcs</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Converts a multi-byte string to a wide character string.
(The function name comes from an acronym of 'Multi-Byte String TO Wide
Character String').
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
<td>the space to place the converted wide character string into.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
<td>the multi-byte string to convert, which must be nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_max</code></em> :</span></p></td>
<td>the maximum number of wide characters to place in <em class="parameter"><code>dest</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of wide characters written into <em class="parameter"><code>dest</code></em>, or -1 if
the conversion failed.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>